<?php
$countPost = count( $this->posts );
if( !Session::get( 'authenticated' ) ) :

    header( 'location: '.URL_BASE );
    exit;

endif;
include 'views/inc/header.php'; ?>
<style>
    body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
    [class^=slider] { display: inline-block; margin-bottom: 30px; }
    .output { color: #888; font-size: 14px; padding-top: 1px; margin-left: 5px; vertical-align: top;}
    h1 { font-size: 20px; }
    h2 { clear: both; margin: 0; margin-bottom: 5px; font-size: 16px; }
    p { font-size: 15px; margin-bottom: 30px; }
    h2:first-of-type { margin-top: 0; }
</style>
<style>

    body
    {
        background-position: <?php echo $this->infoSession->bg_position; ?> 55px;
        background-attachment: <?php echo $this->infoSession->bg_attachment; ?>;

    <?php if( $this->infoSession->bg_attachment == 'fixed' ): ?>
        background-repeat: repeat repeat;
    <?php else: ?>
        background-repeat: no-repeat;
    <?php endif; ?>

        background-color: <?php echo $this->infoSession->bg_color; ?>;

    <?php if( $this->infoSession->bg != '' ): ?>
        background-image: url(<?php echo URL_BASE.'public/backgrounds/'.$this->infoSession->bg; ?>);
    <?php endif; ?>
    }

    body a,
    body a:hover { color: <?php echo $this->infoSession->color_link; ?>; }

    .icons { background-color: <?php echo $this->infoSession->color_link; ?>;}
</style>

<link href="<?php echo $_layoutParams['root_css']; ?>colorbox.css" rel="stylesheet" />
<link href="<?php echo $_layoutParams['root_css']; ?>range_slide/simple-slider.css" rel="stylesheet" />
<link href="<?php echo $_layoutParams['root_css']; ?>range_slide/simple-slider-volume.css" rel="stylesheet" />
</head>
<!-- Body -->
<body data-max="<?php echo MAX_LENGTH; ?>">
<?php include 'views/inc/profile_summary_inc.php'; ?>
<!-- warpper_top_bar -->
<div class="warpper_top_bar">
    <!-- inner_top_bar -->
    <header class="inner_top_bar">
        <!-- padding_class -->
        <div class="padding_class">
            <a href="<?php echo URL_BASE; ?>">
                <?php include 'views/inc/logo.php'; ?>
            </a>
            <?php include 'views/inc/navigation.php'; ?>
        </div><!-- padding_class -->
    </header><!-- inner_top_bar -->
</div><!-- warpper_top_bar -->

<!-- page -->
<div class="page">
    <!-- layout -->
    <section class="layout session">
        <div class="popout"></div>
        <!-- padding_class -->
        <div class="padding_class sessionClass">
            <div class="formSearchResp">
                <form action="search/" class="formResponsive" method="get" id="search_engine" accept-charset="UTF-8">
                    <input id="btnItems" name="q" class="mention" type="text" placeholder="<?php echo $_SESSION['LANG']['search_word']; ?>" maxlength="100">
                </form>
            </div>
            <!-- wrapper_grid -->
            <div class="wrapper_grid floatLeft banner_left">

                <?php
                //<---- * advertising * --->
               include 'views/inc/advertising.php';
                //<---- * who_follow * --->
                include 'views/inc/who_to_follow.php';
                //<---- * trending * --->
                include 'views/inc/trending.php';
                ?>

                <!-- Grid 1 -->
                <div class="grid_1">
                    <!-- container_grid -->
                    <div class="container_grid about_pages">
                        <?php include 'views/inc/footer_session.php'; ?>
                    </div><!-- container_grid -->
                </div><!-- Grid 1 -->


            </div><!-- wrapper_grid -->

            <!-- Grid 2 -->
            <div class="grid_2 floatLeft content_center no-bg no-border ">
                <?php include 'views/inc/profile_static.php'; ?>
                <div class="grid_1 bg">
                    <!--                    <h4 class="titleBar box-class">--><?php //echo $_SESSION['LANG']['discover']; ?><!--</h4>-->
                    <!---->
                    <!--                    <span class="news_post"></span>-->

                    <ul class="posts ">
                        <div id="container-loader">
                            <div class="loading-bar"></div>
                        </div>

                        <?php
                        if( $countPost == 0 ):
                            ?>
                            <span class="notfound" style="display: none;">
                        <?php echo $_SESSION['LANG']['no_results']; ?>
                    </span>
                        <?php endif; ?>
                    </ul>
                </div>
            </div><!-- Grid 2 -->

            <!-- wrapper_grid -->
            <div class="wrapper_grid floatRight  banner_right">

                <?php
                //<---- * advertising * --->
               include 'views/inc/advertising.php';
                //<---- * who_follow * --->
                include 'views/inc/who_to_follow.php';
                //<---- * trending * --->
                include 'views/inc/trending.php';
                ?>

                <!-- Grid 1 -->
                <div class="grid_1 ">
                    <!-- container_grid -->
                    <div class="container_grid about_pages">
                        <?php include 'views/inc/footer_session.php'; ?>
                    </div><!-- container_grid -->
                </div><!-- Grid 1 -->


            </div><!-- wrapper_grid -->
        </div><!-- padding_class -->
    </section><!-- layout -->
</div><!-- page -->
<div class="modal">
    <div id="content_modal">
    </div>
</div>



<script src="<?php echo $_layoutParams['root_js']; ?>jquery-1.7.1.min.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>jquery.easing.1.3.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>jquery.placeholder.1.1.1.min.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>jquery-ui-1.8.17.custom.min.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>functions.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>count.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>add.post.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>jquery.form.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>timeago/jqueryTimeago_<?php echo $_SESSION['lang']; ?>.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>jquery.colorbox.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>jquery.scroll.user.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>discover.timeline.js"></script>
<script src="<?php echo $_layoutParams['root_js']; ?>range_slide/simple-slider.min.js"></script>

<?php if( !Session::get( 'authenticated' ) ) : ?>
    <script src="<?php echo $_layoutParams['root_js']; ?>login.sign.up.js"></script>
<?php endif; ?>

<script type="text/javascript">

    $(".galeryAjax").colorbox({
        fixed: false,
        maxHeight: 550
    });

    $('.posts').scrollPagination({
        nop     : 10,
        offset  : 0,
        error   : '',
        delay   : 500,

        scroll  : true,
        query   : 0,
        file    : 'ajax.discover.php',
        _userId : '',
        totalGlobal : <?php echo $countPost; ?>
    });

    jQuery(document).ready(function($) {

        $('#reply_post').live('hover', function(){
            if ($(this).data('hascharcount') == undefined) {
                $(this).data('hascharcount', true).charCount({ allowed: <?php echo MAX_LENGTH; ?>, warning: 10 });
            }
        });





    });//<-------- * DOM * ------>


</script>
</body>
</html>
